//
//  NCDefines.h
//  BaiduNews
//
//  Created by Neusoft on 11-8-1.
//  Copyright 2011 Neusoft. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <Foundation/NSBundle.h>

#define AppEngine ((LVAppDelegate *)[[UIApplication sharedApplication] delegate]).engine
// ---------------- Application ----------------
#define kApplicationId           1000000
// 如果百度同学需要修改Q参数，可以修改此宏定义
//1099a	APPSTORE
//1413a	BaiduTravel_web官网ios
//1415b 91手机助手	
//1417a 同步推
//1432c iphone中文网
#define kQParameter              @"1099a"
#define kAudioProductID          @"81"
#define kMapKey                  @"B0BAA383809C029A259C3316EEB8C0E9D39DC57C"

// ---------------- Size(Point) ----------------
#define kSizeScreenWidth         320.0
#define kSizeScreenHeight        480.0
#define kSizeNaviBarHeight       44.0
#define kSizeTabBarHeight        49.0
#define kSizeStatusBarHeight     20.0
// ---------------- Device ----------------
#define kDeviceVersionAvailable  3.2
#define kDeviceId                [[UIDevice currentDevice] uniqueIdentifier]
#define kDeviceVersion           [[[UIDevice currentDevice] systemVersion] floatValue]
#define kDeviceScreenWidth       kDeviceVersion < kDeviceVersionAvailable ? kSizeScreenWidth : [[[UIScreen mainScreen] currentMode] size].width
#define kDeviceScreenHeight      kDeviceVersion < kDeviceVersionAvailable ? kSizeScreenHeight : [[[UIScreen mainScreen] currentMode] size].height
// ---------------- Duration ----------------
#define kDurationSystemAnimation 0.3
// ---------------- Path ----------------
// ---------------- URL ----------------
// ---------------- URLFormat ----------------

#define VALID_STRING(str) ((str) && ([(str) isKindOfClass:[NSString class]]) && ([(str) length]>0))
#define VALID_ARRAY(arr) ( (arr) && ([(arr) isKindOfClass:[NSArray class]]) && ([(arr) count]>0))

// debug macro
// enable test server by siwei
//#define DEBUG_URL_SIW

// force use loginmanager bduss
#define USE_LOGINMANAGER_INFO 
// use code to set bduss
//#define NOUSE_LOGINMANAGER_INFO

// enable bb test server
// #define DEBUG_URL_TEMP_SERVER

// force disable GPS, first check this value
// #define DEBUG_GPS_FORCE_DISABLE

// enable user defined gps data, if not define DEBUG_GPS_FORCE_DISABLE, check this value
//#define DEBUG_GPS_FORCE_ENABLE_EBUGDATA

// if do not define DEBUG_GPS_FORCE_DISABLE and DEBUG_GPS_FORCE_ENABLE_EBUGDATA. use actual GPS data on device.

#define DEBUG_ENABLE_LOGIN

// 显示景点的上级景点
#define DEBUG_ENABLE_SCENE_FULLPATH

// 让微游记详情页可查看大图
#define DEBUG_ENABLE_SHOW_TRAVEL_BIGPIC

// debug gpx pos
#define DEBUG_TEST_GPSX 116.411697
#define DEBUG_TEST_GPSY 6.178728

// 禁止使用图片缓存
// #define DEBUG_DISABLE_IMAGECACHE

//通用图片边框距离
#define commonImageBorder 4

//每次请求条数
#define kDefaultRequestCountPerPage 20
#define kSmallRequestCountPerPage   10

// 最大存储通知条数
#define kMaxNoticeCount             20

//下拉更新的时候，保持最大数组个数
#define kDefaultArrayMaxCount       40

//下拉更新的时候，如果新数据超过kDefaultNewDataCountWithOldDataDeleteCheck条，则删除老数据
#define kDefaultNewDataCountWithOldDataDeleteCheck 10

#define kDefaultImageFrame              CGRectMake(0, 0, 88, 63)

#define kDefaultSquareImageName         @"image_pic_bg.png"
#define kDefaultImageName               @"image_default.png"
#define kDefaultImageNameBig            @"image_default_big.png"
#define kDefaultImageNameMiddle         @"image_default_middle.png"

#define kDefaultAvantarImageName        @"image_avantar.png"
#define kDefaultAvantarImageNameBig     @"image_big_avatar.png"

#ifdef DEBUG_URL_TEMP_SERVER
//#define kDefineLVCODECommonString       @"sdfjwler234870128409281304jfksajklfjsajlf23423"
//#define kDefineLVCODERequestTimeString  @"sdfjwler234870128409281304jfksajklfjsajlf"
//#define kDefineLVCODECommonStringTime   @"sdfjwler234870128409281304jfksajklfjsajlf23423"

#define kDefineLVCODECommonString       @"lv_app_key_Z%C!Z#KUkAtZsZ[Qog^a[UTXqiee1;I:"
#define kDefineLVCODERequestTimeString  @"lv_app_key_Z%C!Z#KUkAtZsZ[Qog^a[UTXqiee1;I:"
#define kDefineLVCODECommonStringTime   @"lv_time_key_keScpekuT&~Qj[BfdZj$VZ6=~{{}|?%j"

#else
#define kDefineLVCODECommonString       @"lv_app_key_Z%C!Z#KUkAtZsZ[Qog^a[UTXqiee1;I:"
#define kDefineLVCODERequestTimeString  @"lv_app_key_Z%C!Z#KUkAtZsZ[Qog^a[UTXqiee1;I:"
#define kDefineLVCODECommonStringTime   @"lv_time_key_keScpekuT&~Qj[BfdZj$VZ6=~{{}|?%j"
#endif


#define kKeepCacheHours                 48

